﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BigClassManager.aspx.cs" Inherits="GuoTao.Web.Admin.BigClassManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link href="inc/dv.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #CAD7F7;
}
-->
</style>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>汽车分类管理</title>
</head>
<body>
<script>
function a()
{

 if(document.getElementById("txtbigclassname").value=="")
 {
 alert("类别名称不能为空！");
 document.getElementById("txtbigclassname").focus();
 return false;
 }
 
 
 }
 function b()
 {
 var aa=document.getElementById("txtBigClassorder").value;
  if(aa=="") 
{ 
alert("排序不能为空！"); 
document.getElementById("txtBigClassorder").focus();
return false; 
}

 if(checknumber(aa)) 
{ 
alert("只允许输入数字！"); 
document.getElementById("txtBigClassorder").focus();
return false; 
}

}

function checknumber(String) 
{ 
var Letters = "1234567890"; 
var i; 
var c; 
for( i = 0; i < String.length; i ++ ) 
{ 
c = String.charAt( i ); 
if (Letters.indexOf( c ) ==-1) 
{ 
return true; 
} 
} 
return false; 
} 

</script>
    <form id="form1" runat="server">
    <div>

<table  width="85%" border="0" cellspacing="1" cellpadding="0"  align=center class="tableBorder">
  <tr> 
<th height=24 colspan=2><B>汽车分类管理</B></th>
</tr>
  <tr>
    <td style="height: 157px">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  border="0" CellSpacing="1" cellpadding="0" align="center" bordercolorlight="#ceceff" bordercolordark="#ecf5ff"
        DataKeyNames="bigclassid"
        OnRowEditing = "GridView1_RowEditing" GridLines=None
        OnRowUpdated = "GridView1_RowUpdated" OnRowCancelingEdit = "GridView1_CancelingEdit" AllowPaging="True" AllowSorting="True" PageSize="5" OnRowUpdating="GridView1_RowUpdating" OnPageIndexChanged="GridView1_PageIndexChanged" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDeleting="GridView1_RowDeleting"
        >
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblBigclassid" Text='<%# Eval("bigclassid") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Label ID="lblBigclassid" Text='<%# Eval("bigclassid") %>' runat="server"></asp:Label>
                    </EditItemTemplate>
                    <HeaderStyle BackColor="#B8DEDC" ForeColor="Black" CssClass="forumrow" />
                    <ItemStyle CssClass="forumrow" Width="30px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="类别名称">
                    <ItemTemplate>
                        <asp:Label ID="lblbigclassname" Text='<%# Eval("bigclassname") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtbigclassname" Text='<%# Eval("bigclassname") %>' runat="server"  onchange="javascript:return b();"></asp:TextBox>
                    </EditItemTemplate>
                    <HeaderStyle BackColor="#B8DEDC" ForeColor="Black" CssClass="forumrow" />
                    <ItemStyle CssClass="forumrow" Width="100px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="类别排序">
                    <ItemTemplate>
                        <asp:Label ID="lblBigClassorder" Text='<%# Eval("bigclassorder") %>' runat="server"></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtBigClassorder" Text='<%# Eval("bigclassorder") %>' runat="server"></asp:TextBox>
                    </EditItemTemplate>
                    <HeaderStyle BackColor="#B8DEDC" ForeColor="Black" CssClass="forumrow" />
                    <ItemStyle CssClass="forumrow" Width="60px" />
                </asp:TemplateField>
                
			    <asp:CommandField HeaderText="Edit" ShowEditButton="True" ShowDeleteButton="True">
                    <HeaderStyle BackColor="#B8DEDC"  ForeColor="Black"/>
                    <ItemStyle CssClass="forumrow" />
                </asp:CommandField>
            </Columns>
        </asp:GridView>
   </td>
  </tr>

</table>

    </div>
    </form>
</body>
</html>
